#ifndef PARSE_H_
#define PARSE_H_
#include <stdio.h>
#include <stdlib.h>
#include <string.h>


#define MAX_TOKEN_LENGTH 1000
#define MAX_FILE_SIZE 1000000


enum
{
    C_IDENTIFIER,
    C_KEYWORD,
    C_OTHER,
    C_WHITESPACE,
    C_ERROR,
    C_EOF
};



typedef struct c_token_t
{
    char   text[MAX_TOKEN_LENGTH];
    int    length;
    int    type;
    long   offset;
} token;



void print_token(token * t);
int get_next_token(char **s, token *t);
int get_next_int(char **s);
char *get_input_line(void);
long file_size(FILE *f);
char *file_buffer_alloc(FILE *file);

#endif /*PARSE_H_*/
